#include <common>
#include <logdepthbuf_pars_fragment>
varying vec2 vUv;
uniform float iTime;
uniform vec2 iResolution;
varying vec4 mvPosition;

void main() {
    #include <logdepthbuf_fragment>

    // 创建三条等距条纹
    float stripePattern = fract(mvPosition.y / 2. - iTime * 0.);

    float range = 0.52 + sin(iTime * 10.) * .05;

    // 使用smoothstep创建渐变效果
    float stripe = smoothstep(0.0, 0.48, stripePattern) * smoothstep(1.0, range, stripePattern);

    // 设置绿色条纹颜色
    // vec3 color = vec3(0.0, stripe, 0.0);

    gl_FragColor = vec4(0., 1., 0., pow(stripe, 5.));
    #include <tonemapping_fragment>
    #include <colorspace_fragment>
}
